<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="jstl-fn" prefix="fn" %>
<%@ taglib prefix="c" uri="jstl"%>
<jsp:include page="Templates/metas.jsp"/>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
		
		<jsp:include page="Templates/headerEng.jsp"/>
		
		<div id="container_aside">
		<span id="node_chat_njsd" class="ico_chat"></span>
       <jsp:include page="Templates/submenu_miredpostEng.jsp"/>
       
        <section id="container_right">
        	<h1 class="mine_title"><img src="img/shadow_title.png" class="shadow_mineTit">MY REDPOST</h1>
				<h2 class="subtitle txt_blue underline">SEE MY SHIPMENTS<span class="left_buttons"><img alt="ico_verDatella" src="img/ico_verDatella.png"> <span>See details</span> &ensp; <img alt="ico_cambioDir" src="img/ico_cambioDir.png" width="19" height="19"><span>Change delivery address</span> &ensp; <img alt="ico_subirFactura" src="img/ico_subirFactura.png"> <span>Load invoice or ticket</span></span></h2>
				<p class="txt_small txt_gray">
					Here you are able to look up the status of your pending delivery shipments.
					Use the "+" button to the complete information for each one.
				</p>
				<br>
				<table class="table_envios">
					<thead>
						<tr>
							<th width="40%">DESCRIPTION</th>
							<th width="12%">WAYBILL</th>
							<th width="12%">STATUS</th>
							<th width="12%">DATE OF STATUS</th>
							<th width="12%">FINAL PAYMENT</th>
							<th width="12%">ACCIONS</th>
						</tr>
					</thead>
					<c:choose>
						<c:when test="${ArribosNum ne 0 }">
						<c:set var="estilo" value="0"/>
						<c:forEach items="${Arribos}" var="arr" varStatus="arrSt">
							<c:choose>
								<c:when test="${estilo eq 0 }">
									<tr>
								</c:when>
								<c:otherwise>
									<tr class="alternate">	
								</c:otherwise>
							</c:choose>
							
								<td>${arr.descripcion}</td>
								
								<td><span style="cursor:pointer;" onclick="document.forms['generalForm'].submit();"><u> ${arr.gArribo}<u> </span></td>
								<td>${arr.status}</td>
								<td>${arr.fecha}</td>
								<td>USD ${arr.costoTotal}</td>
								<td align="center">
									<html:form action="mis_envios_detalle.do" method="post" styleId="detalle${arr.cveArribo}">
										<html:hidden property="num" value="${arr.cveArribo}"/>
										<html:hidden property="bandera" value="1"/>
										<html:image alt="ico_verDatella" src="img/ico_verDatella.png" />
									</html:form>
									<c:if test="${arr.estado < '8' }">
									<html:form action="mis_envios_dir.do" method="post" styleId="direccion">
										<html:hidden property="num" value="${arr.cveArribo}"/>
										<html:image alt="ico_cambioDir" src="img/ico_cambioDir.png" />										
									</html:form>
									</c:if>
									<a href="mis_envios_archivos.do?cve=${arr.cveArribo}&num=0"><img alt="ico_subirFactura" src="img/ico_subirFactura.png"></a>
								</td>
							</tr>
							<c:choose>
								<c:when test="${estilo eq 0 }">
									<c:set var="estilo" value="1"/>
								</c:when>
								<c:otherwise>
									<c:set var="estilo" value="0"/>	
								</c:otherwise>
							</c:choose>
						</c:forEach>							
						</c:when>
						<c:otherwise>
							<tr>
								<td colspan="6" align="center">No records</td>
							</tr>
						</c:otherwise>
					</c:choose>
				</table>
				<p class="txt_small">
					
				</p>
        </section>
        <span class="clear"></span>
        </div>
        
<jsp:include page="Templates/footerEng.jsp"/>